
package coderead.plugin.ui.quickFix;

import com.intellij.codeInsight.daemon.QuickFixActionRegistrar;
//import com.intellij.codeInsight.quickfix.UnresolvedReferenceQuickFixProvider;
//import com.intellij.psi.PsiJavaCodeReferenceElement;
import com.intellij.codeInsight.quickfix.UnresolvedReferenceQuickFixProvider;
import com.intellij.psi.util.PsiUtil;
import org.jetbrains.annotations.NotNull;
import com.intellij.psi.PsiJavaCodeReferenceElement;

public class CassSearchQuickFixProvider extends UnresolvedReferenceQuickFixProvider<PsiJavaCodeReferenceElement> {
  @Override
  public void registerFixes( PsiJavaCodeReferenceElement ref,  QuickFixActionRegistrar registrar) {
    if (!PsiUtil.isModuleFile(ref.getContainingFile())) {
//      registrar.register(new AddMavenDependencyQuickFix(ref));
      registrar.register(new CassSearchQuickFixAction(ref));
    }
  }

  @Override
  public Class<PsiJavaCodeReferenceElement> getReferenceClass() {
    return PsiJavaCodeReferenceElement.class;
  }


}